/* eslint valid-jsdoc: "off" */

'use strict'

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = (appInfo) => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = (exports = {})

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1678147614927_8651'

  // add your middleware config here
  // 全局拦截
  config.middleware = []

  // add your user config here
  const userConfig = {
    // myAppName: 'egg',
    mysql: {
      // 单数据库信息配置
      client: {
        // host
        host: '47.101.45.245',
        // 端口号
        port: '3306',
        // 用户名
        user: '2006A-shixun',
        // 密码
        password: 'T6jz8zcyBbjHCbFK',
        // 数据库名
        database: '2006a-shixun',
      },
      // 是否加载到 app 上，默认开启
      app: true,
      // 是否加载到 agent 上，默认关闭
      agent: false,
    },
    payConfig: {
      appId: '2021000122647107',
      // 应用私钥：
      privateKey:
        `MIIEogIBAAKCAQEA7RxZsFwQNewQxIyjhDxKcBWLVpQNx0R7CxOVLlfjfyg7SbOAUTa5bCh kylcUnVswjlaoE3mXLf272JXv8b5V4wlNf+iJgbWwgbFEPntQuWyCEpW2Jp4X2SqdXd1H03KZNi/E2YJ+G0g5R5uSADnCYf1AOlv4/7OQ4lWLNfxfvw4np2WdcaSozlW2+6qVkV+oNCD7t5duk1Z/6U/lvX3Lou8Y5CHKCDgYDJ96PD3z9l/OkuEDKjMAcGICiEShGG2ANB21bBUVFrfbgddU+9RECAMRCR9vWsfnZ9kwJ27QxpxGnZ2a43+PBUVjsI+SXjeeTE7sDfazN/D8tUtuoZU7iwIDAQABAoIBABcmwH8ezhplvVFjpgegV2hQQjWm6R1+y0DOna9Tt4vP4tIUa8ACRuKPox+6lvGyWLBdN7YHFkLQVooUQcRp4Dr1ypJlox9+HQjcxRwQsFYaiSzFX26v2wZCSfFDTOMRenI3AdJ3ElcZmzYps3zAJwGoV6AbINner5PZ5GjWBodB625n8C3DDrQy6M5Jg56s199RAh8L7qLI8WeeMDHOcbJTnpMtRtu7ZyFoZOr0hHvc7OBo3W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684DTevBGDtfhemitHyo6xUO4efd568lNSWwv6ABlTnoxM0HbNcmDzYM/tPqslY+FTacCtAOOHE8dVtu13vE88PA1EAA4NKNafLv5H+/tzRmkX6oFiebRXGkKxHDZh2hAWpAhpPveSJQfIL/GYf4q2po9kfS95gM0sDOBhaqY5IwEsARi0nhlw9vLkJcHASeqZj0neb4u7a0TLYubQ4JI/fwyxSswUAGlDdds5mcH+vV925+UXaxpQ4v/0VLlUm47IqCZlvLucJs6CE+LgFDRFksIy8E6ftcptJcWmrHEgV1HNO6XNe1fAzmYzPaglnwIDAQAB`,
      signType: 'RSA2', // RSA2
      // https://openapi.alipaydev.com/gateway.do
      // https://openapi-sandbox.dl.alipaydev.com/gateway.do
      gateway: 'https://openapi-sandbox.dl.alipaydev.com/gateway.do', // 网关地址
      timeout: 5000, // 网关超时时间
      camelcase: true, // 是否把网关返回的下划线 key 转换为驼峰写法
    },
  }

  return {
    ...config,
    ...userConfig,
  }
}
